package org.example.observer.improve;

/**
 * @author wangbin
 * @date 2024/4/19
 * @vesion 1.0
 */
public class CurrentConditions implements Observerstr {

    private float temerature;
    private float pressure;
    private float humidity;


    public void update(float temerature,float pressure,float humidity){
        this.temerature=temerature;
        this.pressure=pressure;
        this.humidity=humidity;
        this.display();
    }

    public void display(){
        System.out.println("---temerature-"+temerature);
        System.out.println("---pressure-"+pressure);
        System.out.println("---humidity-"+humidity);
    }
}
